package com.powernode.ssm;

import com.powernode.ssm.springAnalysis.a01.event.TestPublishEvent1;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.DefaultSingletonBeanRegistry;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.io.Resource;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.io.IOException;
import java.lang.reflect.Field;
import java.util.Locale;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 天坑！！！！！！
 * 创建SpringBoot项目（Project或Module）时，
 * 勾选lombok后不起作用、运行出错的问题，
 * 原因是pom文件自动生成的依赖有问题，建议不勾选lombok，
 * 等项目创建好后手动引入lombok依赖
 */
@MapperScan("com.powernode.ssm.dao")
@SpringBootApplication(scanBasePackages = "com")//提升扫描的范围，让其可以扫描到OtherBean
@ComponentScan(excludeFilters = {
		@ComponentScan.Filter(
				type = FilterType.REGEX,
				pattern = "com.powernode.ssm.springAnalysis.*"
		)
})
@EnableScheduling  // ✅ 启用定时任务支持
public class SsmApplication {

	public static void main(String[] args) {
		SpringApplication.run(SsmApplication.class, args);
	}

}
